(function(){
    //获取bomb-btn的列表
    var bombBtns = document.getElementsByClassName('bomb-btn');
    var bindForms = document.getElementsByClassName('bind-form');
    //弹窗
    var bombBox = document.querySelector('#bombBox');
    //设置点击事件
    var bombWindow = function(e){

    }
    for (let i = 0; i < bombBtns.length; i++) {
        //循环绑定点击事件
        const a = bombBtns[i];
        a.addEventListener('click',(e) => {
            bombBox.style.display = 'flex'
            for (let j = 0; j < bindForms.length; j++){
                let bindForm = bindForms[j];
                bindForm.style.display = bindForm.dataset.type === e.target.dataset.type?'block':'none'
            }   
        })
    }
    //判断表单与点击目标是否匹配，匹配显示
    //关闭弹框
    bombBox.addEventListener('click',(e) => {
        if(e.target === bombBox){
            bombBox.style.display = 'none'
        }
    })
})()